import Taro, { Component } from '@tarojs/taro'
import { View, Text, Image } from '@tarojs/components'
import './index.scss'
//新增收获地址页面
import { AtIcon, AtRate, AtTextarea ,AtButton} from 'taro-ui'
export default class Index extends Component {

  config = {
    navigationBarTitleText: '我的评价',
    navigationBarBackgroundColor: '#6381F7',
    // navigationBarTitleText: 'WeChat',
    navigationBarTextStyle: 'white'
  }

  constructor(props) {
    super(props)
    this.state = {
      value: 5
    }

  }

  handleChange(value) {
    this.setState({
      value
    })
  }


  componentWillMount() { }

  componentDidMount() { }


  onesaluate = () => {
    Taro.navigateTo({
      url: '../index.6/index'
    })
  }

  onAtButton = () => {
    Taro.navigateBack({
      delta: 1
    })
  }


  render() {


    return (
      <View className='index'>
        <View className='index_top'>
          <Image
            className='Image'
            src='https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1759133402,2696021330&fm=26&gp=0.jpg'
          />
          <View><Text>#1燃气站</Text></View>
          <View >
            <AtRate
              value={this.state.value}
              onChange={this.handleChange.bind(this)}
            />
          </View>

          <View>
            <Text style={{ color: "#ccc", fontSize: "12px" }}>非常好</Text>
          </View>
        </View>
        <AtTextarea
       
       value={this.state.value}
       onChange={this.handleChange.bind(this)}
       maxLength={200}
       placeholder='你的问题是...'
     />
     <AtButton type='primary' onClick={this.onAtButton}>提交</AtButton>
      </View>
    )
  }
}

